package com.fw.controller;

import com.fw.util.SessionUser;
import com.jfinal.core.Controller;

public class CommonController extends Controller {
	public void index() {
		renderJsp("/WEB-INF/jsp/index.jsp");
	}

	public void toWelcomeView() {
		renderJsp("/WEB-INF/jsp/welcome.jsp");
	}

	public void logout() {
		SessionUser su = getSessionAttr("sessionUser");
		if (su == null)
			redirect("/login.jsp");
		else {
			removeSessionAttr("sessionUser");
			redirect("/login.jsp");
		}
	}
}
